<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2018/8/30
 * Time: 下午1:04
 */
function error($message = '错误', $code = 500)
{
    return ['code' => $code, 'message' => $message];
}

function success(array $message = [], $code = 200)
{
    $message['code'] = $code;
    return $message;
}